package com.cloud.order.service.service.impl;

import com.cloud.order.service.mapper.OrderMapper;
import com.cloud.order.service.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public String create(int productId) {
        int insert = orderMapper.create(productId);
        return insert == 1 ? "创建订单成功" : "创建订单失败";
    }
}
